using System.Collections;
using System.Collections.Generic;
using UnityEditor.Timeline.Actions;
using UnityEngine;

public class PlayerMoveState : PlayerGroundedState
{
    public PlayerMoveState( Player player, StateMachine<PlayerState> stateMachine, string animBoolName) : base( player, stateMachine, animBoolName)
    {
    }

    public override void Enter()
    {
        base.Enter();
    }

    public override void Exit()
    {
        base.Exit();
    }

    public override void Update()
    {
        base.Update();
        player.SetVelocity(xInput*player.moveSpeed,rb.velocity.y);
        if (Mathf.Approximately(xInput,0)) {
            stateMachine.ChangeState(player.idleState);
        }

    }
}
